package models

import "github.com/zw2582/ginlib"

type ProductSeo struct {
	Id             int64 `xorm:"pk autoincr"`
	ProductId      int64
	SeoTitle       string
	SeoKeyword     string
	SeoDescription string
	SeoCode        string
}

func init() {
	ginlib.XormAddWaitSync(new(ProductSeo))
}

func ProductSeoGetByProductId(productId int64) (data ProductSeo, err error) {
	_, err = DB.Where("product_id = ?", productId).Get(&data)
	return
}